import axios from 'axios';
const HOST_INTF = "http://localhost/gallaryMarket/interface/Filter.php";
export const requestt = async(params,callback)=>{
    let res = await axios({
      method:"post",
      url:HOST_INTF,
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      },
      data:params,
    });
    callback(res);
}
export const upload = async(formData,callback)=>{
  axios.post(
    HOST_INTF, formData, 
    {
      headers: {
        'Content-Type': 'multipart/form-data',
      }
    }
  )
  .then(res => {
    callback(res);
  })
  .catch(error => {
    console.error(error);
  });
}